<?php
	get_header();

	if(isset($_GET['author_name']))
	{
		$info = get_userdatabylogin($author_name);
	}
	else
	{
		$info = get_userdata(intval($author));
	}
?>


<div id="pagewrap">
	<div id="page">
		<div id="content" class="author_page">

			<div id="author_page" class="post">
				<div class="entry">

					<h1 class="title"><?php echo $info->display_name; ?></h1>
				
					<?php if(!empty($info->user_description)) : ?>
						<blockquote>
							<?php echo $info->user_description; ?>
						</blockquote>
					<?php endif; ?>
					
					<div class="align_right" style="padding-left: 10px;">
						<?php echo get_avatar($info->user_email, 56); ?>
					</div>
				
					<h1 class="title"><?php _e('Information', 'fazio'); ?></h1>
					
					<ul>
						<?php if(!empty($info->user_url)) : ?>
							<li>
							<?php _e('Website:', 'fazio'); ?> <a href="<?php echo $info->user_url; ?>"><?php echo $info->user_url; ?></a>
							</li>
						<?php endif; ?>
						
						<?php if(!empty($info->user_twitter)) : ?>
							<li>
								<?php _e('Twitter:', 'fazio'); ?> <a href="http://www.twitter.com/<?php echo $info->user_twitter; ?>"><?php echo $info->user_twitter; ?></a>
							</li>
						<?php endif; ?>
					</ul>
				
				</div><!-- end entry -->
			</div><!-- end author_page -->
			
			
			<?php if ( have_posts() ) : ?>
				<div class="post author_page_post_list">
					<div class="entry">
					
						<h1 class="title"><?php _e('Last posts from', 'fazio'); ?> <?php echo $info->display_name; ?></h1>
					
						<ul>
							<?php while ( have_posts() ) : the_post(); ?>
								<?php get_template_part('dry/post_list'); ?>
							<?php endwhile; ?>
						</ul>
					</div><!-- end entry -->
				</div><!-- end post -->
				<?php pagination(); ?>

			<?php endif; ?>
			

		</div><!-- end content -->
		<?php get_sidebar(); ?>
	</div><!-- end page -->
</div><!-- end pagewrap -->

<?php get_footer(); ?>